package com.woniuxy.service.impl;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.SocketUtils;

import com.woniuxy.dao.ManagerMapper;
import com.woniuxy.pojo.Manager;
import com.woniuxy.service.ManagerService;
@Transactional
@Service
public class ManagerServiceImpl implements ManagerService {
	@Autowired
	private ManagerMapper managerMapper;
	
	

	@Override
	public List<Manager> getAll() {
		// TODO Auto-generated method stub
		return managerMapper.getAll();
	}

	@Override
	public Manager login(String name, String password) {
		// TODO Auto-generated method stub
		return managerMapper.login(name, password);
	}

	@Override
	public void delById(Integer id) {
		// TODO Auto-generated method stub
		managerMapper.delById(id);
	}

	@Override
	public void addManager(Manager m) {
		// TODO Auto-generated method stub
		managerMapper.addManager(m);
	}

	@Override
	public Manager selectUserByName(String name) {
		// TODO Auto-generated method stub
		return managerMapper.selectUserByName(name);
	}

	@Override
	public void changePass(String username, String firstPass) {
		// TODO Auto-generated method stub
		managerMapper.changePass(username,firstPass);
	}

	@Override
	public Manager selectUserByNamePhone(String name) {
		// TODO Auto-generated method stub
		return managerMapper.selectUserByNamePhone(name);
	}



}
